<template>
  <div>
    <h3>个人名词库</h3>
    <div class="flex-container">
      <el-button v-for="(item, index) in myWords" :key="index" class="box-card" type="text">
        {{ item.noun }}
      </el-button>
    </div>
  </div>
</template>
<script>
  import axios from 'axios';

  export default {
    data() {
      return {
        myWords: [],
      };
    },
    mounted() {
      axios({
        method: 'get',
        url: 'http://127.0.0.1:4523/m1/3571383-0-default/api/properwords/private/all',
      })
        .then((res) => {
          console.log('请求成功');
          console.log(res.data.data);
          this.myWords = res.data.data;
        })
        .catch((error) => {
          console.log('请求失败');
          console.log('error');
          this.success = false;
        });
    },
  };
</script>
